import request from "@/utils/request";

// 签到配置分页列表
export function getSignConfigApi(query) {
  return request({
    url: "/signIn/config/list",
    method: "get",
    params: query,
  });
}

// 获取所有参与人员列表
export function getAlluserListApi() {
  return request({
    url: "/signIn/config/userList",
    method: "get",
  });
}

// 新增签到配置
export function addSignConfigApi(data) {
  return request({
    url: "/signIn/config",
    method: "post",
    data: data,
  });
}

// 删除签到配置
export function deleteSignConfigApi(postId) {
  return request({
    url: "/signIn/config/" + postId,
    method: "delete",
  });
}

// 根据id查询详情
export function getSignConfigByIdApi(postId) {
  return request({
    url: "/signIn/config/" + postId,
    method: "get",
  });
}

// 修改签到配置
export function putSignConfigApi(data) {
  return request({
    url: "/signIn/config",
    method: "put",
    data: data,
  });
}
